import type { Sample } from "@/types"

export const sampleData: Sample[] = [
  // 未生成任何编号的样品
  {
    id: "1",
    sampleNumber: "337924851408001",
    sampleName: "土壤样品A",
    sampleType: "土壤样品",
    testingUnit: "环境检测中心",
    mixedNumber: null,
    samplingNumber: null,
    operator: null,
    operationTime: null,
    inputOperator: ["张三", "李四", "王五", "赵六"][Math.floor(Math.random() * 4)],
    inputTime: new Date(
      2025,
      0,
      Math.floor(Math.random() * 20) + 1,
      Math.floor(Math.random() * 8) + 9,
      Math.floor(Math.random() * 60),
    ),
  },
  {
    id: "2",
    sampleNumber: "337924851408002",
    sampleName: "水质样品B",
    sampleType: "水质样品",
    testingUnit: "水质检测站",
    mixedNumber: null,
    samplingNumber: null,
    operator: null,
    operationTime: null,
    inputOperator: ["张三", "李四", "王五", "赵六"][Math.floor(Math.random() * 4)],
    inputTime: new Date(
      2025,
      0,
      Math.floor(Math.random() * 20) + 1,
      Math.floor(Math.random() * 8) + 9,
      Math.floor(Math.random() * 60),
    ),
  },
  {
    id: "3",
    sampleNumber: "337924851408003",
    sampleName: "空气样品C",
    sampleType: "空气样品",
    testingUnit: "大气监测站",
    mixedNumber: null,
    samplingNumber: null,
    operator: null,
    operationTime: null,
    inputOperator: ["张三", "李四", "王五", "赵六"][Math.floor(Math.random() * 4)],
    inputTime: new Date(
      2025,
      0,
      Math.floor(Math.random() * 20) + 1,
      Math.floor(Math.random() * 8) + 9,
      Math.floor(Math.random() * 60),
    ),
  },
  {
    id: "4",
    sampleNumber: "337924851408004",
    sampleName: "土壤样品D",
    sampleType: "土壤样品",
    testingUnit: "环境检测中心",
    mixedNumber: null,
    samplingNumber: null,
    operator: null,
    operationTime: null,
    inputOperator: ["张三", "李四", "王五", "赵六"][Math.floor(Math.random() * 4)],
    inputTime: new Date(
      2025,
      0,
      Math.floor(Math.random() * 20) + 1,
      Math.floor(Math.random() * 8) + 9,
      Math.floor(Math.random() * 60),
    ),
  },
  {
    id: "5",
    sampleNumber: "337924851408005",
    sampleName: "水质样品E",
    sampleType: "水质样品",
    testingUnit: "水质检测站",
    mixedNumber: null,
    samplingNumber: null,
    operator: null,
    operationTime: null,
    inputOperator: ["张三", "李四", "王五", "赵六"][Math.floor(Math.random() * 4)],
    inputTime: new Date(
      2025,
      0,
      Math.floor(Math.random() * 20) + 1,
      Math.floor(Math.random() * 8) + 9,
      Math.floor(Math.random() * 60),
    ),
  },
  // 只生成了混合编号的样品 - MX001
  {
    id: "6",
    sampleNumber: "337924851408006",
    sampleName: "土壤样品F",
    sampleType: "土壤样品",
    testingUnit: "环境检测中心",
    mixedNumber: "MX001",
    samplingNumber: null,
    operator: "张三",
    operationTime: new Date(2025, 0, 15, 10, 30),
    inputOperator: ["张三", "李四", "王五", "赵六"][Math.floor(Math.random() * 4)],
    inputTime: new Date(
      2025,
      0,
      Math.floor(Math.random() * 20) + 1,
      Math.floor(Math.random() * 8) + 9,
      Math.floor(Math.random() * 60),
    ),
  },
  {
    id: "7",
    sampleNumber: "337924851408007",
    sampleName: "土壤样品G",
    sampleType: "土壤样品",
    testingUnit: "环境检测中心",
    mixedNumber: "MX001",
    samplingNumber: null,
    operator: "张三",
    operationTime: new Date(2025, 0, 15, 10, 30),
    inputOperator: ["张三", "李四", "王五", "赵六"][Math.floor(Math.random() * 4)],
    inputTime: new Date(
      2025,
      0,
      Math.floor(Math.random() * 20) + 1,
      Math.floor(Math.random() * 8) + 9,
      Math.floor(Math.random() * 60),
    ),
  },
  {
    id: "8",
    sampleNumber: "337924851408008",
    sampleName: "土壤样品H",
    sampleType: "土壤样品",
    testingUnit: "环境检测中心",
    mixedNumber: "MX001",
    samplingNumber: null,
    operator: "张三",
    operationTime: new Date(2025, 0, 15, 10, 30),
    inputOperator: ["张三", "李四", "王五", "赵六"][Math.floor(Math.random() * 4)],
    inputTime: new Date(
      2025,
      0,
      Math.floor(Math.random() * 20) + 1,
      Math.floor(Math.random() * 8) + 9,
      Math.floor(Math.random() * 60),
    ),
  },
  // 只生成了混合编号的样品 - MX002
  {
    id: "9",
    sampleNumber: "337924851408009",
    sampleName: "水质样品I",
    sampleType: "水质样品",
    testingUnit: "水质检测站",
    mixedNumber: "MX002",
    samplingNumber: null,
    operator: "李四",
    operationTime: new Date(2025, 0, 16, 14, 45),
    inputOperator: ["张三", "李四", "王五", "赵六"][Math.floor(Math.random() * 4)],
    inputTime: new Date(
      2025,
      0,
      Math.floor(Math.random() * 20) + 1,
      Math.floor(Math.random() * 8) + 9,
      Math.floor(Math.random() * 60),
    ),
  },
  {
    id: "10",
    sampleNumber: "337924851408010",
    sampleName: "水质样品J",
    sampleType: "水质样品",
    testingUnit: "水质检测站",
    mixedNumber: "MX002",
    samplingNumber: null,
    operator: "李四",
    operationTime: new Date(2025, 0, 16, 14, 45),
    inputOperator: ["张三", "李四", "王五", "赵六"][Math.floor(Math.random() * 4)],
    inputTime: new Date(
      2025,
      0,
      Math.floor(Math.random() * 20) + 1,
      Math.floor(Math.random() * 8) + 9,
      Math.floor(Math.random() * 60),
    ),
  },
  {
    id: "11",
    sampleNumber: "337924851408011",
    sampleName: "水质样品K",
    sampleType: "水质样品",
    testingUnit: "水质检测站",
    mixedNumber: "MX002",
    samplingNumber: null,
    operator: "李四",
    operationTime: new Date(2025, 0, 16, 14, 45),
    inputOperator: ["张三", "李四", "王五", "赵六"][Math.floor(Math.random() * 4)],
    inputTime: new Date(
      2025,
      0,
      Math.floor(Math.random() * 20) + 1,
      Math.floor(Math.random() * 8) + 9,
      Math.floor(Math.random() * 60),
    ),
  },
  // 一个抽检编号(SP001)对应两个混合编号(MX003和MX004)
  {
    id: "12",
    sampleNumber: "337924851408012",
    sampleName: "空气样品L",
    sampleType: "空气样品",
    testingUnit: "大气监测站",
    mixedNumber: "MX003",
    samplingNumber: "SP001",
    operator: "王五",
    operationTime: new Date(2025, 0, 18, 9, 15),
    inputOperator: ["张三", "李四", "王五", "赵六"][Math.floor(Math.random() * 4)],
    inputTime: new Date(
      2025,
      0,
      Math.floor(Math.random() * 20) + 1,
      Math.floor(Math.random() * 8) + 9,
      Math.floor(Math.random() * 60),
    ),
  },
  {
    id: "13",
    sampleNumber: "337924851408013",
    sampleName: "空气样品M",
    sampleType: "空气样品",
    testingUnit: "大气监测站",
    mixedNumber: "MX003",
    samplingNumber: "SP001",
    operator: "王五",
    operationTime: new Date(2025, 0, 18, 9, 15),
    inputOperator: ["张三", "李四", "王五", "赵六"][Math.floor(Math.random() * 4)],
    inputTime: new Date(
      2025,
      0,
      Math.floor(Math.random() * 20) + 1,
      Math.floor(Math.random() * 8) + 9,
      Math.floor(Math.random() * 60),
    ),
  },
  {
    id: "14",
    sampleNumber: "337924851408014",
    sampleName: "空气样品N",
    sampleType: "空气样品",
    testingUnit: "大气监测站",
    mixedNumber: "MX003",
    samplingNumber: "SP001",
    operator: "王五",
    operationTime: new Date(2025, 0, 18, 9, 15),
    inputOperator: ["张三", "李四", "王五", "赵六"][Math.floor(Math.random() * 4)],
    inputTime: new Date(
      2025,
      0,
      Math.floor(Math.random() * 20) + 1,
      Math.floor(Math.random() * 8) + 9,
      Math.floor(Math.random() * 60),
    ),
  },
  {
    id: "15",
    sampleNumber: "337924851408015",
    sampleName: "土壤样品O",
    sampleType: "土壤样品",
    testingUnit: "环境检测中心",
    mixedNumber: "MX004",
    samplingNumber: "SP001",
    operator: "王五",
    operationTime: new Date(2025, 0, 18, 9, 15),
    inputOperator: ["张三", "李四", "王五", "赵六"][Math.floor(Math.random() * 4)],
    inputTime: new Date(
      2025,
      0,
      Math.floor(Math.random() * 20) + 1,
      Math.floor(Math.random() * 8) + 9,
      Math.floor(Math.random() * 60),
    ),
  },
  {
    id: "16",
    sampleNumber: "337924851408016",
    sampleName: "土壤样品P",
    sampleType: "土壤样品",
    testingUnit: "环境检测中心",
    mixedNumber: "MX004",
    samplingNumber: "SP001",
    operator: "王五",
    operationTime: new Date(2025, 0, 18, 9, 15),
    inputOperator: ["张三", "李四", "王五", "赵六"][Math.floor(Math.random() * 4)],
    inputTime: new Date(
      2025,
      0,
      Math.floor(Math.random() * 20) + 1,
      Math.floor(Math.random() * 8) + 9,
      Math.floor(Math.random() * 60),
    ),
  },
  {
    id: "17",
    sampleNumber: "337924851408017",
    sampleName: "土壤样品Q",
    sampleType: "土壤样品",
    testingUnit: "环境检测中心",
    mixedNumber: "MX004",
    samplingNumber: "SP001",
    operator: "王五",
    operationTime: new Date(2025, 0, 18, 9, 15),
    inputOperator: ["张三", "李四", "王五", "赵六"][Math.floor(Math.random() * 4)],
    inputTime: new Date(
      2025,
      0,
      Math.floor(Math.random() * 20) + 1,
      Math.floor(Math.random() * 8) + 9,
      Math.floor(Math.random() * 60),
    ),
  },
  // 添加更多样品数据以测试分页
  ...Array.from({ length: 50 }, (_, i) => ({
    id: `${18 + i}`,
    sampleNumber: `337924851408${String(18 + i).padStart(3, "0")}`,
    sampleName: `测试样品${String.fromCharCode(65 + (i % 26))}${Math.floor(i / 26) + 1}`,
    sampleType: ["土壤样品", "水质样品", "空气样品"][i % 3],
    testingUnit: ["环境检测中心", "水质检测站", "大气监测站"][i % 3],
    mixedNumber:
      i < 20
        ? null
        : i < 35
          ? `MX${String(Math.floor(i / 3) + 5).padStart(3, "0")}`
          : `MX${String(Math.floor(i / 3) + 5).padStart(3, "0")}`,
    samplingNumber: i < 35 ? null : `SP${String(Math.floor(i / 10) + 2).padStart(3, "0")}`,
    operator: i < 20 ? null : ["张三", "李四", "王五", "赵六"][i % 4],
    operationTime: i < 20 ? null : new Date(2025, 0, 10 + (i % 20), 9 + (i % 8), 30),
    inputOperator: ["张三", "李四", "王五", "赵六"][Math.floor(Math.random() * 4)],
    inputTime: new Date(
      2025,
      0,
      Math.floor(Math.random() * 20) + 1,
      Math.floor(Math.random() * 8) + 9,
      Math.floor(Math.random() * 60),
    ),
  })),
]
